/**
 * @Author: Afun
 */
import {
  exInput,
  exSwitch,
  // exDivider,
  exPdaValidate,
  exRequestData,
} from '@ve/common/components/extension'

export default {
  VERSION: '202200725',
  type: 'uiPdaUpload',
  name: '上传',
  icon: 'file-upload-line',
  //数据别名
  // dataName: 'uiPdaUpload_data',
  //数据集合 表单 列表等等
  data: {
    requestData: {},
  },
  extension: {
    model: exInput('Model', 'uiPdaUpload_name'), //ok
    extendRule: exPdaValidate(''),
    // ...exDivider(0),
    label: exInput('标签', '上传'), //ok
    api: exInput('上传地址', ''),
    method: exInput('method', ''),
    requestData: exRequestData('参数', [
      { key: 'BUSINESS_TYPE', value: '' },
      { key: 'BUSINESS_NUMBER', value: 1 },
      { key: 'BUSINESS_LINE_NUMBER', value: 50 },
    ]),
    hidden: exSwitch('隐藏', false),

    size: exInput('尺寸', '80'),
    paddingTop: { type: 'exInputNumber', name: '上内边距', value: 0 },
    paddingRight: { type: 'exInputNumber', name: '右内边距', value: 0 },
    paddingBottom: { type: 'exInputNumber', name: '下内边距', value: 0 },
    paddingLeft: { type: 'exInputNumber', name: '左内边距', value: 0 },
    // multiple: {
    //   type: 'exInputNumber',
    //   name: '文件上传数',
    //   value: 1,
    //   min: 1,
    //   max: 9,
    // },
    maxCount: { type: 'exInputNumber', name: '文件上传数量限制', value: 4, min: 0, max: 999 },
    width: exInput('宽度', 'auto', '填写数字:单位px,auto:自动宽度'),
    // labelWidth: exInput('label宽度', 'auto', '填写数字:单位px,auto:自动宽度'),
    disabled: exSwitch('禁用', false),
    accept: exInput('文件类型', '*', '文件后缀；举例:.pdf,.xlsx'),
    autoUpload: exSwitch('自动上传', false),
    // errorMsg: exInput('错误信息', ''),
  },
  //交互
  interaction: [],
  //条件、逻辑指令
  // logicInstruction: [],
  //数据源绑定
}
